/**
 * 
 */
package org.tcp.client.exception;

/**
 * @author kucheng.liao@autonavi.com
 * @Date Sep 19, 2014
 */
public enum ExceptionEnum {
	/**
	 * Sysem exception
	 */
	SYSTEM_EXCEPTION(1000, "System exception"),
	/**
	 * parameter,system
	 */
	PARAMETER_EXCEPTION(1001, "PARAMETER EXCEPTION"),
	/**
	 * 
	 */
	TIME_OUT(2001,"get connection time out");

	private int code;

	private String message;

	private String string;

	private ExceptionEnum(int code, String message) {
		this.code = code;
		this.message = message;
		StringBuilder sb = new StringBuilder();
		sb.append(" code : ").append(code).append("\t---->\t").append(message);
		string = sb.toString();
	}

	public String getMessage() {
		return message;
	}

	public int getCode() {
		return code;
	}

	public String toString() {
		return string;
	}
}
